<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Conexao
 *
 * @author hoffmann
 */
class Conexao {
    //put your code here
    
    private $host = "localhost";
    private $user = "postgres";
    private $password = "postgres";
    private $db = "bdtp01";
    
    public function conectBD(){
        $conexao = " host = ".$this->host." user= ".$this->user." password= ".$this->password." dbname= ".$this->db; 
        $pg = pg_connect($conexao) or die("Can't connect to database.");

        
        
        return $pg;
    }
    
    public function desconectBD(){
        $pg = pg_close();
        
    }
    
    
}

?>
